/* Pi-hole: A black hole for Internet advertisements
*  (c) 2017 Pi-hole, LLC (https://pi-hole.net)
*  Network-wide ad blocking via your own hardware.
*
*  This file is copyright under the latest version of the EUPL.
*  Please see LICENSE file for your rights under this license. */

.layout-boxed {
  background: url("../img/boxed-bg.png") repeat fixed;
}

.small-box span {
  transition-duration: 0.5s;
}

.small-box span.glow {
  text-shadow: 0 0 5px currentColor;
}

@-webkit-keyframes Pulse {
  from {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes Pulse {
  from {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

p#dhcpnotice[hidden] {
  display: none;
}

.lookatme #dhcpnotice {
  display: block;
}

td.lookatme {
  display: table-cell;
}

.lookatme {
  color: #630030;
  opacity: 1;
  position: relative;
  display: inline-block;
}

/* this pseudo element will be faded in and out in front /*
/* of the lookatme element to create an efficient animation. */
.lookatme:after {
  color: #e33100;
  text-shadow: 0 0 5px #e33100;
  /* in the html, the lookatme-text attribute must */
  /* contain the same text as the .lookatme element */
  content: attr(lookatme-text);
  padding: inherit;
  position: absolute;
  inset: 0 0 0 0;
  z-index: 1;
  /* 20 steps / 2 seconds = 10fps */
  -webkit-animation: 2s infinite Pulse steps(20);
  animation: 2s infinite Pulse steps(20);
}

.table-responsive {
  -webkit-overflow-scrolling: touch;
}

/* Optimize Queries-Table for small screens */
/* Time column */
#all-queries td:nth-of-type(1),
/* Status column */
#all-queries td:nth-of-type(5) {
  white-space: nowrap;
}

/* Domain column */
#all-queries td:nth-of-type(3) {
  min-width: 200px;
  word-break: break-all;
  white-space: pre-wrap;
}

/* Allow Info String to wrap (useful while filtering entries on small screen) */
#all-queries_info {
  white-space: unset;
}

/* adjust the buttons width */
#all-queries_wrapper .pagination > li > a {
  padding-left: 6px;
  padding-right: 6px;
  min-width: 34px;
  text-align: center;
}

@media screen and (max-width: 500px), screen and (min-width: 767px) and (max-width: 1000px) {
  /* Hide "Previous" & "Next"-Buttons in Pagination */
  #all-queries_wrapper .pagination > li.previous,
  #all-queries_wrapper .pagination > li.next {
    display: none;
  }

  #all-queries_wrapper .pagination > li:nth-of-type(2) a {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
  }

  #all-queries_wrapper .pagination > li:nth-last-of-type(2) a {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
  }
}

#resetButton {
  font-weight: 700;
}

.vertical-alignment-helper {
  display: table;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.vertical-alignment-helper > .vertical-align-center {
  display: table-cell;
  vertical-align: middle;
}

.vertical-alignment-helper > .vertical-align-center > .modal-content {
  width: 250px;
  margin-left: auto;
  margin-right: auto;
  word-wrap: break-word;
  pointer-events: all;
}

.alSpinner {
  top: 0.1em;
  left: 0.1em;
  width: 0.8em;
  height: 0.8em;
  border-radius: 50%;
  border: 4px solid #c0c0c0;
  border-right-color: transparent;
  -webkit-animation: fa-spin 1s infinite linear;
  animation: fa-spin 1s infinite linear;
}

.chartjs-tooltip {
  opacity: 0;
  position: absolute;
  pointer-events: none;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.8);
  max-width: 95%;
  z-index: 900;
}

.chartjs-tooltip th {
  padding-bottom: 3px;
}

.chartjs-tooltip,
.chartjs-tooltip .arrow {
  transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.chartjs-tooltip .arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
}

.chartjs-tooltip.bottom .arrow {
  top: 100%;
  left: 50%;
  margin: 0 -5px -5px;
  border-width: 5px 5px 0;
  border-top-color: rgba(0, 0, 0, 0.8);
}

.chartjs-tooltip.top .arrow {
  top: 0;
  left: 50%;
  border-width: 0 5px 5px;
  margin: -5px -5px 0;
  border-bottom-color: rgba(0, 0, 0, 0.8);
}

.chartjs-tooltip.right.center .arrow {
  top: 50%;
  left: 100%;
  margin: -5px -5px -5px 0;
  border-width: 5px 0 5px 5px;
  border-left-color: rgba(0, 0, 0, 0.8);
}

.chartjs-tooltip.left.center .arrow {
  top: 50%;
  left: 0;
  margin: -5px 0 -5px -5px;
  border-width: 5px 5px 5px 0;
  border-right-color: rgba(0, 0, 0, 0.8);
}

.chartjs-tooltip-key {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 3px;
  vertical-align: text-top;
}

.chart-legend {
  overflow: auto;
}

.chart-legend ul {
  list-style-type: none;
  padding-left: 45px;
}

.chart-legend li {
  cursor: pointer;
  position: relative;
  line-height: 1;
  margin: 0 0 6px;
}

.chart-legend li span {
  display: inline-block;
  height: 12px;
}

.colorBoxWrapper {
  font-size: 14px;
}

.colorBoxWrapper:hover {
  transform: scale(1.15);
}

.chart-legend li .colorBoxWrapper {
  position: absolute;
  width: 20px;
  left: -20px;
  top: 0;
  line-height: 1;
}

.chart-legend li .legend-color-box {
  display: none;
  width: 12px;
  margin-right: 5px;
}

.chart-legend li .legend-label-text {
  line-height: 1;
  word-break: break-word;
}

.chart-legend li .legend-label-text:hover {
  text-decoration: underline;
}

.strike,
.strike span {
  text-decoration: line-through !important;
}

/* These are needed because AdmintLTE 2.x doesn't support Font Awesome 5.x */
.sidebar-menu > li > a > .fab,
.sidebar-menu > li > a > .far,
.sidebar-menu > li > a > .fas {
  width: 20px;
}

/* Utilities */
.text-underline {
  text-decoration: underline;
}

.breakall {
  white-space: pre-wrap;
  word-break: break-all;
  word-wrap: break-word;
}

.no-user-select {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.pointer {
  cursor: pointer;
}

.bootstrap-select.bs-container.align-right {
  left: unset !important;
  right: 10px;
}

.input-group-addon {
  padding: 0 12px;
}

.user-panel {
  display: flex;
  align-items: center;
  padding: 10px 0;
}

.user-panel .image {
  flex: 1 0 25%;
  margin: 0 10px;
  text-align: center;
}

.user-panel > .image > img {
  max-width: 52px;
  min-width: 30px;
}

.user-panel > .info {
  padding: 0;
  position: relative;
  line-height: 1.05;
  flex: 1 1 auto;
  left: auto;
}

.user-panel > .info > p {
  margin-bottom: 6px;
}

.user-panel > .info > span {
  display: inline-block;
  padding: 0;
  margin: 2px 0;
  font-size: 11px;
}

.user-panel > .info i {
  margin-right: 3px;
}

.row-centered > div[class^="col-"] {
  display: inline-block;
  float: none;
}

.version-info {
  margin-top: 10px;
}

.daterangepicker {
  font-family: inherit;
}

.form-inline .form-control {
  display: inline-block;
  width: 100%;
  vertical-align: middle;
}

.select2-container--default .select2-results > .select2-results__options {
  max-height: 400px;
}

/* Work around code that expects icon fonts rather than SVG.
   Newer versions of AdminLTE have support for SVG icons,
   https://github.com/ColorlibHQ/AdminLTE/pull/2920
   so this code will only be needed temporarily. */

.sidebar-menu li > a > .fa-angle-left,
.sidebar-menu li > a > .pull-right-container > .fa-angle-left {
  height: 1em;
}

.sidebar-toggle-svg {
  position: relative;
  color: #fff;
  float: left;
  background: none;
  padding: 15px;
}

.sidebar-toggle-svg:hover {
  color: #f6f6f6;
  background: #367fa9;
}

.box,
.small-box {
  border-radius: 10px;
  z-index: 0; /* fix the small-box z-index (related to '.small-box .icon') */
}

.small-box .icon {
  z-index: -1; /* sends the icon behind the text */
}

/*** Icons grow on hover, but remain centered ***/
.small-box:hover .icon {
  font-size: 90px; /* keep the same font-size, to avoid shifting the position */
  transform: scale(1.06);
}

.list-status-0 {
  color: #7d7d7d;
}

.list-status-1 {
  color: #74c700;
}

.list-status-2 {
  color: #98ca52;
}

.list-status-3 {
  color: #ff8c00;
}

.list-status-4 {
  color: #cc0000;
}

td.details-control {
  cursor: pointer;
}

.dataTables-child td {
  padding: 2px 5px;
}

.blocked-row td {
  background-color: rgb(229, 83, 75, 0.1);
}

.allowed-row td {
  background-color: rgb(70, 149, 74, 0.1);
}

.reload-box {
  display: none;
}
.reload-box div {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.reload-box span {
  padding-right: 20px;
}

@media screen and (max-width: 991px) {
  #domain-search-block {
    display: block;
  }
  #domain {
    margin: 5px 0;
  }
  #domain-search-block .input-group-btn {
    margin: 5px 0;
    text-align: center;
  }
  #domain-search-block .input-group-btn button {
    margin: 0 2px;
    border-radius: 3px;
  }
}

/*** Login form ***/
.form-control-feedback {
  right: 12px;
}

.loginpage-logo {
  width: 30%;
}
.layout-boxed .loginpage-logo {
  width: 50%;
}

.login-options {
  display: flex;
  margin: 0 0 15px -15px;
  flex-wrap: wrap;
}

.login-options div {
  position: relative;
  margin-left: 15px;
}

.login-options div:last-child {
  margin-right: 2px;
  margin-bottom: 0 !important;
  flex: 0 1 auto;
  font-size: 95%;
}

.pwd-field {
  flex: 1 0 auto;
}

.login-help {
  padding: 6px;
  background: rgba(127, 127, 127, 0.05);
  text-align: center;
}

.login-help p {
  margin: 0;
  font-size: clamp(11px, (100vw - 400px) / 45, 15px);
  line-height: 1.6;
}

@media screen and (min-width: 768px) {
  .layout-boxed:not(.sidebar-collapse) .login-help p {
    font-size: clamp(11px, (min(100vw, 1250px) - 380px) / 47, 15px);
  }

  /* hide warning icon only when logged in and menu is not collapsed */
  .logged-in:not(.sidebar-collapse) #top-warning-count {
    display: none;
  }
}

/*** Warning icon and count ***/
.warning-count {
  position: absolute;
  display: inline-block;
  text-align: center;
  background: #e08e0b;
  color: #fff;
  line-height: 1;
  padding: 0.25em 0.5em;
  margin: -0.7em 4px;
  border-radius: 2em;
  right: 3em;
  top: 50%;
  font-size: 12px;
}

#top-warning-count {
  top: 55%;
  left: 50%;
  right: unset;
  margin: 0;
}

.treeview-menu .warning-count {
  margin-right: 0;
  font-size: 10px;
}

.menu-open > a > span.warning-count {
  display: none;
}

/* hide submenu warning count during animation */
li:not(.menu-open) .treeview-menu .warning-count {
  display: none;
}

/* hide warning count when hover a collapsed sidebar */
.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse
  .sidebar-menu
  > li:hover
  > a
  > span.warning-count {
  display: none !important;
}

/*** Accessibility - Add focus for checkboxes and radio buttons (icheck) ***/
[class*="icheck-"] > input:first-child:focus + label::before {
  outline: 1px #3c8dbc solid;
  border-color: #3c8dbc;
}

/* Fix some datatables layout on small screens */
@media screen and (max-width: 660px), screen and (min-width: 767px) and (max-width: 960px) {
  #domainsTable_wrapper .table-responsive {
    border: none;
    overflow: unset;
  }
  #domainsTable {
    border: 0;
    box-sizing: border-box;
  }
  #domainsTable thead {
    display: none;
  }
  #domainsTable tr {
    display: flex;
    padding: 15px 0;
    flex-wrap: wrap;
    box-sizing: border-box;
    align-items: end;
    border: 1px solid rgba(127, 127, 127, 0.4);
    margin: 10px 0;
    border-radius: 6px;
  }
  #domainsTable td {
    flex: 1 1 auto;
    width: 100px;
    display: block;
    border: none;
    box-sizing: border-box;
    order: 2;
    text-align: right;
    padding: 4px 8px;
  }
  #domainsTable td:nth-child(2n) {
    width: calc(100% - 120px);
  }
  #domainsTable td:first-child {
    width: calc(100% - 40px);
    order: 1;
    text-align: left;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(127, 127, 127, 0.25);
    margin-bottom: 5px;
  }
  #domainsTable td:last-child {
    width: 40px;
    order: 1;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(127, 127, 127, 0.25);
    margin-bottom: 5px;
  }
  #domainsTable td:nth-child(2),
  #domainsTable td:nth-child(4) {
    text-align: left;
  }
  #domainsTable td::before {
    display: block;
    font-weight: bold;
    font-size: smaller;
  }
  #domainsTable td:nth-child(2)::before {
    content: "Type:";
  }
  #domainsTable td:nth-child(4)::before {
    content: "Comment:";
  }
}
@media screen and (min-width: 767px) {
  #domainsTable select.form-control {
    padding: 0 0 0 5px;
    width: auto;
  }
}
@media screen and (max-width: 767px) {
  #domainsTable th {
    white-space: normal;
  }
}

.icon-bounce {
  display: inline-block;
  position: relative;
  animation: icon-bounce 2.4s 3 ease-in-out;
  font-size: 1.6em;
}

@keyframes icon-bounce {
  0%,
  15%,
  50%,
  100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-5px);
  }
  30% {
    transform: translateY(4px);
  }
  35% {
    transform: translateY(-3px);
  }
  40% {
    transform: translateY(2px);
  }
  45% {
    transform: translateY(-1px);
  }
}

.navbar-nav {
  height: 50px;
}

.navbar-nav > .user-menu > .dropdown-menu > .user-body a {
  background: transparent !important;
}

/*** Donate button - navbar ***/
.main-header .navbar-custom-menu .user-footer .donate {
  margin: 15px;
  padding: 0.8em 1em;
  width: calc(100% - 30px);
  color: #fff;
  background: #96060c;
  border: none;
  border-radius: 6px;
}

.main-header .navbar-custom-menu .user-footer .donate:hover,
.main-header .navbar-custom-menu .user-footer .donate:active,
.main-header .navbar-custom-menu .user-footer .donate:active:hover,
.main-header .navbar-custom-menu .user-footer .donate:focus,
.main-header .navbar-custom-menu .user-footer .donate:active:focus {
  background: #f60d1a;
}

.navbar-custom-menu > .navbar-nav > li:nth-child(1) {
  padding: 0 10px 0 0;
}

#apiTokenIframe {
  width: 100%;
  border: 0;
  height: 500px;
}

#apiTokenModal pre {
  background: #fff;
}

.no-danger-area {
  margin: 0.5em 0 1em;
  border-left: 2px solid green;
  border-right: 2px solid green;
  padding: 1px 1em 0.5em;
  box-shadow: 0 0 2px -1px #bbb;
  border-radius: 6px;
}

.danger-area {
  margin: 0.5em 0 1em;
  border-left: 2px solid red;
  border-right: 2px solid red;
  padding: 1px 1em 0.5em;
  box-shadow: 0 0 2px -1px #bbb;
  border-radius: 6px;
}

.menu-icon {
  margin-right: 0.5em;
}

/* Datatables Select - bgcolor */
:root {
  --datatable-bgcolor: #e0e8ee;
}

div.dt-buttons {
  margin: 2px 0 5px;
}
@media screen and (max-width: 767px) {
  div.dt-buttons {
    margin-bottom: 5px;
    float: none;
    text-align: center;
  }
}

/* Datatables Select - checkbox outline */
table.dataTable tbody td.select-checkbox::before,
table.dataTable tbody th.select-checkbox::before {
  border-color: currentColor;
  border-radius: 2px;
  border-width: 2px;
  width: 13px;
  height: 13px;
}

table.dataTable tr.selected td.select-checkbox::after,
table.dataTable tr.selected th.select-checkbox::after {
  color: currentColor;
  content: "";
  text-shadow: none;
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  width: 4px;
  height: 8px;
  transform: rotate(45deg) translate(7px, 3px);
}

.datatable-bt {
  padding: 3px 8px;
}

.datatable-bt span {
  font-size: 17px;
}

/* Datatables Select - selected row bgcolor */
table.dataTable tbody > tr.selected,
table.dataTable tbody > tr > .selected {
  background: none;
  background-image: linear-gradient(var(--datatable-bgcolor), var(--datatable-bgcolor));
}

#messagesTable pre {
  word-break: break-word;
  white-space: pre-wrap;
}

#output {
  position: relative;
  margin: 5px 0;
  min-height: 36px;
  padding: 4px 8px;
}

.loading::before {
  content: " ";
  position: absolute;
  padding: 1em;
  left: 0;
  right: 0;
  bottom: 0;
  line-height: 1;
  background: rgba(35, 60, 85, 0.8);
  box-shadow: 0 0 6px -3px rgba(0, 0, 0, 0.5);
}
.loading::after {
  content: "\1F553\FE0E  Loading...";
  position: absolute;
  padding: 1em;
  left: 0;
  right: 0;
  bottom: 0;
  color: #fff;
  line-height: 1;
  animation: 2s infinite Pulse steps(20);
}
